INITIAL SETUP

MODULES

GRAPH STYLE

CONSTANTS


DATA MANIPULATION FUNCTIONS

FFT

Computer the Fast Fourier Transform

  • Returns the Power Spectral Density

WELCH METHOD

Estimates filtered (smoothened) Power Spectral Density

  • nperseg - increase by power of 2 to increase resolution

FIND_K

Finds the frequency with the maximum amplitude in a given interval

BANDPASS FILTER (HARD)

  • Takes frequency domain data pair as input

BANDPASS FILTER (GRADUAL)

  • Using Butterworth second order section
  • Takes time domain data pair as input

GRAPHING FUNCTIONS

The graphs are plotted on a logarithmic scale

  • n - compaction (1 to 6)
  • c - data value
    • 1 - ACC_X
    • 2 - ACC_Y
    • 3 - ACC_Z
    • 4 - AUDIO
  • lth - Lower frequency value for the bandpassfilter
  • hth - Higher frequency value for the bandpassfilter
      - set as -1 to set as maximum
      - < 640

graph()

Graph FFT and Welch transforms in the same graph

wave()

Graph Wave data for a given compaction

compare_graph()

Compare FFT, Welch, and Wave frequency domain data in different graphs

listk()

Plot the highest frequency in the given frequency interval for every compaction

  • visual - Set False to omit the graph
  • ft - Transform method to use
    • Set as fft to use FFT - more noise, but highest resolution
    • Set as welch to use Welch Estimation - lower noise (set high nperseg to improve resolution if required)

The function prints the frequencies (and their corresponding compactions) sorted in ascending order

compose()

Use this function to experiment


GRAPHS

Ranges of interest are handpicked based on observations from the graphs. They are written under their component headings.
Please follow these examples to see how to read them.

X6 = [52, 257, 397] implies that the ranges of interest for ACC_X are

  • [52 - 6 , 52 + 6] = [46, 58] Hz
  • [257 - 6 , 257 + 6] = [251, 263] Hz
  • [397 - 6 , 397 + 6] = [391, 403] Hz

Y3 = [397, 404] implies that the ranges of interest for ACC_Y are

  • [397 - 3 , 397 + 3] = [394, 400] Hz
  • [404 - 3 , 404 + 3] = [401, 407] Hz

The following are the frequency domain graphs around the points of interest for each for the data components.


ACC_X

X6 = [52, 257, 397]

ACC_Y

Y6 = [52, 103, 155, 206, 257, 310, 325, 360, 448, 500] Y3 = [397, 404]

ACC_Z

Z6 = [52, 103, 155, 206, 257, 310, 360, 448, 500] Z3 = [397, 404]

AUDIO

A6 = [52, 103, 155, 206, 257, 310, 360, 500] # Note the overtones A3 = [397, 404, 410]

PATTERN ANALYSIS

654321 is the dominant pattern, i.e. the frequency reduces with compaction